home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'OleAuto.pas' rev: 3.00
-
- #ifndef OleAutoHPP
- #define OleAutoHPP
- #include <SysUtils.hpp>
- #include <OleCtl.hpp>
- #include <OLE2.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
- #include <comobj.hpp>
-
- namespace Oleauto
- {
- //-- type declarations -------------------------------------------------------
- typedef System::TMetaClass*TAutoClass;
-
- enum TAutoClassInstancing { acInternal, acSingleInstance, acMultiInstance };
-
- struct TAutoClassInfo
- {
- System::TMetaClass*AutoClass;
- System::AnsiString ProgID;
- System::AnsiString ClassID;
- System::AnsiString Description;
- TAutoClassInstancing Instancing;
- } ;
-
- class DELPHICLASS TRegistryClass;
- class PASCALIMPLEMENTATION TRegistryClass : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TRegistryClass* FNext;
- System::TMetaClass*FAutoClass;
- System::AnsiString FProgID;
- GUID FClassID;
- System::AnsiString FDescription;
- TAutoClassInstancing FInstancing;
- int FRegister;
-
- public:
- __fastcall TRegistryClass(const TAutoClassInfo &AutoClassInfo);
- __fastcall virtual ~TRegistryClass(void);
- void __fastcall UpdateRegistry(bool Register);
- };
-
- enum TStartMode { smStandalone, smAutomation, smRegServer, smUnregServer };
-
- typedef void __fastcall (__closure *TLastReleaseEvent)(bool &Shutdown);
-
- class DELPHICLASS TAutomation;
- class PASCALIMPLEMENTATION TAutomation : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TRegistryClass* FRegistryList;
- int FAutoObjectCount;
- int FClassFactoryCount;
- bool FIsInprocServer;
- TStartMode FStartMode;
- TLastReleaseEvent FOnLastRelease;
- void __fastcall CountAutoObject(bool Created);
- void __fastcall Initialize(void);
- void __fastcall LastReleased(void);
-
- public:
- __fastcall TAutomation(void);
- __fastcall virtual ~TAutomation(void);
- void __fastcall RegisterClass(const TAutoClassInfo &AutoClassInfo);
- void __fastcall UpdateRegistry(bool Register);
- __property int AutoObjectCount = {read=FAutoObjectCount, nodefault};
- __property bool IsInprocServer = {read=FIsInprocServer, write=FIsInprocServer, nodefault};
- __property TStartMode StartMode = {read=FStartMode, nodefault};
- __property TLastReleaseEvent OnLastRelease = {read=FOnLastRelease, write=FOnLastRelease};
- };
-
- class DELPHICLASS EOleError;
- class PASCALIMPLEMENTATION EOleError : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EOleError(const System::AnsiString Msg) : Sysutils::Exception(Msg
- ) { }
- /* Exception.CreateFmt */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleError(int Ident, Extended Dummy) : Sysutils::Exception(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const int
- Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleError(const System::AnsiString Msg, int AHelpContext) : Sysutils::
- Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleError(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleError(void) { }
-
- };
-
- class DELPHICLASS EOleSysError;
- class PASCALIMPLEMENTATION EOleSysError : public Oleauto::EOleError
- {
- typedef Oleauto::EOleError inherited;
-
- private:
- int FErrorCode;
-
- public:
- __fastcall EOleSysError(int ErrorCode);
- __property int ErrorCode = {read=FErrorCode, nodefault};
- public:
- /* Exception.CreateFmt */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleSysError(int Ident, Extended Dummy) : Oleauto::EOleError(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleSysError(const System::AnsiString Msg, int AHelpContext) :
- Oleauto::EOleError(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleSysError(int Ident, int AHelpContext) : Oleauto::EOleError(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleSysError(void) { }
-
- };
-
- class DELPHICLASS EOleException;
- class PASCALIMPLEMENTATION EOleException : public Oleauto::EOleError
- {
- typedef Oleauto::EOleError inherited;
-
- private:
- int FErrorCode;
- System::AnsiString FSource;
- System::AnsiString FHelpFile;
-
- public:
- __fastcall EOleException(const tagEXCEPINFO &ExcepInfo);
- __property int ErrorCode = {read=FErrorCode, nodefault};
- __property System::AnsiString HelpFile = {read=FHelpFile};
- __property System::AnsiString Source = {read=FSource};
- public:
- /* Exception.CreateFmt */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleException(int Ident, Extended Dummy) : Oleauto::EOleError(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleException(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleException(const System::AnsiString Msg, int AHelpContext)
- : Oleauto::EOleError(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleException(int Ident, int AHelpContext) : Oleauto::EOleError(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleException(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
-
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleException(void) { }
-
- };
-
- struct TCallDesc;
- typedef TCallDesc *PCallDesc;
-
- #pragma pack(push, 1)
- struct TCallDesc
- {
- Byte CallType;
- Byte ArgCount;
- Byte NamedArgCount;
- Byte ArgTypes[256];
- } ;
- #pragma pack(pop)
-
- //-- var, const, procedure ---------------------------------------------------
- #define MaxDispArgs (Byte)(32)
- extern PACKAGE TAutomation* Automation;
- extern PACKAGE void __fastcall OleError(int ErrorCode);
- extern PACKAGE void __fastcall OleCheck(int Result);
- extern PACKAGE GUID __fastcall StringToClassID(const System::AnsiString S);
- extern PACKAGE System::AnsiString __fastcall ClassIDToString(const GUID &ClassID);
- extern PACKAGE GUID __fastcall ProgIDToClassID(const System::AnsiString ProgID);
- extern PACKAGE System::AnsiString __fastcall ClassIDToProgID(const GUID &ClassID);
- extern PACKAGE System::Variant __fastcall VarFromInterface(IUnknown* Unknown);
- extern PACKAGE IDispatch* __fastcall VarToInterface(const System::Variant &V);
- extern PACKAGE System::Variant __fastcall CreateOleObject(const System::AnsiString ClassName);
- extern PACKAGE System::Variant __fastcall GetActiveOleObject(const System::AnsiString ClassName);
- extern PACKAGE void __fastcall DispInvoke(IDispatch* Dispatch, PCallDesc CallDesc, Ole2::PDispIDList
- DispIDs, void * Params, System::PVariant Result);
- extern PACKAGE void __fastcall DispInvokeError(int Status, const tagEXCEPINFO &ExcepInfo);
- extern PACKAGE int __stdcall DllGetClassObject(const GUID &CLSID, const GUID &IID, void *Obj);
- extern PACKAGE int __stdcall DllCanUnloadNow(void);
- extern PACKAGE int __stdcall DllRegisterServer(void);
- extern PACKAGE int __stdcall DllUnregisterServer(void);
-
- } /* namespace Oleauto */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Oleauto;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // OleAuto
-